﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DevelopStudio.Basic
{
    public class AppConst
    {
        #region Path Region

        /// <summary>
        /// Get environment settings from this path.
        /// </summary>
        public const string EnvironmentSettingsPath = "./Config/EnvironmentSettings.xml";

        /// <summary>
        /// Diff tool path.
        /// </summary>
        public const string DiffToolPath = "./DevelopDiff.exe";

        #endregion

        #region URL Region

        /// <summary>
        /// Get member list from the url.
        /// </summary>
        public const string Memberslisturl = "/projects/icson-sh";

        /// <summary>
        /// Get memeber detail from the url
        /// </summary>
        public const string MembersDetailUrl = "/Users/";

        /// <summary>
        /// Login page Url.
        /// </summary>
        public const string LoginUrl = "/login/";

        /// <summary>
        /// My Page Url
        /// </summary>
        public const string MyPageUrl = "/my/page";

        /// <summary>
        /// My Account Url
        /// </summary>
        public const string MyAccountUrl = "/my/account";

        /// <summary>
        /// Bugs Page Url
        /// </summary>
        public const string BugsPageUrl = "/issues/{0}";

        /// <summary>
        /// Bugs Page Edit Url
        /// </summary>
        public const string BugsPageEditUrl = "/issues/{0}/edit";

        /// <summary>
        /// Bugs Page Xml Url
        /// </summary>
        public const string BugsPageXmlUrl = "/issues/{0}.xml";

        /// <summary>
        /// Bugs Search Page Xml Url
        /// </summary>
        public const string BugSearchPageXmlUrl = "/issues.xml?assigned_to_id={0}&limit=100";

        #endregion

        /*
        #region SVN Commnad

        /// <summary>
        /// Use the changelist command to get changelists.
        /// </summary>
        public const string ChangeListCmd = "svn status {0} -q";

        public const string ChangeListDetailCmd = "svn status {0} -q -v --cl {1}";

        #endregion
         **/

        #region FindStr Keyword

        /// <summary>
        /// Get Changelist by Parsing.
        /// </summary>
        public const string KeywordChangeListNameStart = "--- Changelist '";
        public const string KeywordChangeListNameEnd = "'";

        /// <summary>
        /// Form Data Keys.
        /// 忽略两个字段 "attachments[1][file]" and "attachments[1][description]"
        /// Content-Disposition: form-data; name="attachments[1][file]"; filename="" Content-Type: application/octet-stream
        /// Content-Disposition: form-data; name="attachments[1][description]"
        /// </summary>
        public readonly string[] FormDataKeys = new string[]
        {
            "_method", "authenticity_token", "issue[tracker_id]", "issue[subject]", "issue[description]",
            "issue[status_id]", "issue[priority_id]", "issue[assigned_to_id]", "issue[category_id]", "issue[fixed_version_id]",
            "issue[start_date]", "issue[due_date]", "issue[estimated_hours]", "issue[custom_field_values][4]", "issue[custom_field_values][8]",
            "issue[custom_field_values][10]", "issue[custom_field_values][15]", "issue[custom_field_values][16]", "issue[custom_field_values][21]",
            "issue[custom_field_values][24]", "issue[custom_field_values][25]", "issue[custom_field_values][28]", "time_entry[hours]", "time_entry[activity_id]",
            "time_entry[comments]", "notes", "issue[lock_version]", "commit"
        };

        #endregion
    }
}
